﻿using Microsoft.Extensions.DependencyInjection;
using Modules.Project.Entitys;
using Modules.Project.Repositories;
using PmSoft;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Modules.Project
{
    [UseDI(ServiceLifetime.Scoped)]
    public class ProjectCheckinPushLogService
    {
        private readonly ProjectCheckinPushLogRepository projectCheckinPushLogRepository;

        public ProjectCheckinPushLogService(ProjectCheckinPushLogRepository projectCheckinPushLogRepository)
        {
            this.projectCheckinPushLogRepository = projectCheckinPushLogRepository;
        }

        public IEnumerable<int> GetProjectIdsInNoUpdate(int month, int limit = 100)
        {
            return projectCheckinPushLogRepository.GetProjectIdsInNoUpdate(month, limit);
        }

        public void Create(ProjectCheckinPushLog entity)
        {
            projectCheckinPushLogRepository.Insert(entity);
        }
    }
}
